package 多线程.线程池.定时器;

import java.util.Timer;
import java.util.TimerTask;

public class Main {
    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
           @Override
           public void run() {
               System.out.println(3000);
           }
        },3000);
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println(2000);
            }
        },2000);
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println(1000);
            }
        },1000);
    }
}
